<extend name="Public/base" />
<block name="style"> <script
	src="__STATIC__/thinkbox/jquery.thinkbox.js"></script> </block>
<block name="body"> <!-- 标题栏 -->
<div class="main-title">
	<h2>试卷详情 [ {$paperid|get_paper_name} ]</h2>
</div>
<div class="cf">
	<div class="fl">
		<a class="btn"
			href="{:U('builddocument',array('paper'=>$paperid))}">生成文档</a>
	</div>
	<div class="fl">
		<a class="btn"
			href="{:U('Papers/index')}">我的试卷</a>
	</div>
</div>
<!-- 数据列表 -->
<div class="data-table table-striped">
	<table>
		<thead>
			<tr>
				<th>序号</th>
				<th>名称</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<notempty name="list"> <assign name="i" value="1" /> <volist
				name="list" id="vo">
			<tr>
				<td>{$i}</td>
				<td>第{$vo.set}套</td>
				<td>浏览</td>
				<assign name="i" value="$i++" />
			</tr>
			</volist> <else />
			<td colspan="9" class="text-center">暂时还没有内容!</td>
			</notempty>
		</tbody>
	</table>
</div>
<div class="page">{$_page}</div>
</block>
<block name="script"> <script type="text/javascript">
	+function($){
		//搜索功能
		$("#search").click(function(){
			var url = $(this).attr('url');
	        var query  = $('.search-form').find('input').serialize();
	        query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
	        query = query.replace(/^&/g,'');
	        if( url.indexOf('?')>0 ){
	            url += '&' + query;
	        }else{
	            url += '?' + query;
	        }
			window.location.href = url;
		});
		//回车搜索
		$(".search-input").keyup(function(e){
			if(e.keyCode === 13){
				$("#search").click();
				return false;
			}
		});
	    //导航高亮
	    $('.side-sub-menu').find('a[href="{:U('Papers/index')}"]').closest('li').addClass('current');
	}(jQuery);
	</script> </block>
